import router from '@system.router';
export default {
    data: {
        result: 'function功能',
        function_enable_result: null,
        funcValue: null
    },
    setFunctionEnable(isEnable) {
        this.function_enable_result = isEnable;
    },
    setFunction(funType) {
        switch (funType) {
            case 1:
                this.funcValue = "HDC";
                break;
            case 2:
                this.funcValue = "ACM";
                break;
            case 4:
                this.funcValue = "ECM";
                break;
            default:
                break;
        }
        //after set, get current func to show
        this.result = this.getFunction();
    },
    getFunction() {
        return this.funcValue;
    },
    onInit() {
        var fun = this.getFunction();
        this.result = fun;
    },
    onBackPress() {
        router.back();
    }
}
